home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWPartng.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  4.1 KB  |  140 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPartng.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWPARTNG_H
  11. #define FWPARTNG_H
  12.  
  13. #ifndef FWPART_H
  14. #include "FWPart.h"
  15. #endif
  16.  
  17. #ifndef FWPROXY_H
  18. #include "FWProxy.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. //    Forward Declarations
  23. //========================================================================================
  24.  
  25. class FW_MProxy;
  26. class FW_CCloneInfo;
  27. class FW_CProxyFrame;
  28. class FW_CPartProxyFrameIterator;
  29. class FW_CSelection;
  30.  
  31. //========================================================================================
  32. //    class FW_CEmbeddingPart
  33. //========================================================================================
  34.  
  35. class FW_CEmbeddingPart : public FW_CPart
  36. {
  37.     friend class FW_CPartProxyIterator;
  38.  
  39. public:
  40.     FW_DECLARE_CLASS
  41.  
  42. //----------------------------------------------------------------------------------------
  43. //    Initialization/Destruction
  44. //
  45. public:
  46.     FW_CEmbeddingPart(ODPart* odPart, 
  47.                      FW_Instance partInstance,
  48.                     FW_ResourceId partInfoID);
  49.     
  50.     virtual ~FW_CEmbeddingPart();
  51.  
  52. //----------------------------------------------------------------------------------------
  53. //    Inherited API
  54. //
  55. public:                                            
  56.     virtual void                ReleaseAll(Environment *ev);
  57.  
  58.     virtual void                LinkStatusChanged(Environment *ev, ODFrame* odFrame);
  59.  
  60.     virtual ODStorageUnit*        AcquireContainingPartProperties(Environment* ev, 
  61.                                                                 ODFrame* embeddedFrame);
  62.  
  63. //----------------------------------------------------------------------------------------
  64. //    New API
  65. //
  66. public:                                            
  67.     virtual void                EmbeddedFrameRemoved(Environment *ev, 
  68.                                             FW_MProxy* proxy);
  69.                     
  70.     FW_MProxy*                    GetProxy(Environment *ev, ODFrame* embeddedFrame) const;
  71.     
  72. //----------------------------------------------------------------------------------------
  73. //    Internal API (you should never have to called it)
  74. //
  75. public:
  76.     // ----- Cloning -----
  77.     virtual void                PrivCloneInto(Environment *ev,
  78.                                             ODDraftKey key,
  79.                                             ODStorageUnit* toSU,
  80.                                             ODFrame* scope);
  81.  
  82.     // ----- Frame Group/Sequence Number -----
  83.     ODID                        PrivGetNextFrameGroup(Environment *ev);
  84.     void                        PrivSetNextFrameGroup(Environment *ev, ODID frameGroup);
  85.  
  86.     // ----- ProxyFrame list management -----        
  87.     void                         PrivAddProxy(Environment* ev, FW_MProxy* proxy);
  88.     void                         PrivRemoveProxy(Environment* ev, FW_MProxy* proxy);
  89.         
  90.     // ----- Factory -----
  91.     virtual FW_CPresentation*    PrivNewPresentation(Environment *ev, 
  92.                                             FW_CSelection* selection,
  93.                                             ODTypeToken presentationType);
  94.     virtual FW_CDataInterchange* PrivNewDataInterchange(Environment* ev);
  95.  
  96.  
  97. #ifdef FW_BUILD_WIN
  98.     void                        WinAddEmbedMenu(Environment *ev, 
  99.                                             FW_CMenuBar *menuBar);
  100.     ODPart*                        WinCreateEmbeddedPartFromCommand(Environment* ev, 
  101.                                             ODCommandID commandID);
  102.  
  103.     void                         WinEnableEmbedMenu(Environment* ev,
  104.                                             FW_CMenuBar* menuBar);
  105. #endif
  106.  
  107. //----------------------------------------------------------------------------------------
  108. //    Data members
  109. //
  110. private:    
  111.     FW_TOrderedCollection<FW_MProxy>*         fProxys;    
  112.     ODID                        fNextFrameGroup;
  113.  
  114. #ifdef FW_BUILD_WIN
  115.     // This is used by the Windows version to create the embed menu
  116.     FW_CPullDownMenu*            fWinEmbedMenu;
  117.     ODCommandID                    fWinFirstPartID;
  118.     ODCommandID                    fWinLastPartID;
  119.     char                          fTypeString[1024];        // [HLX] need to be dynamic
  120.     char                         *fTypePtr [25];            // [HLX] need to be dynamic
  121. #endif
  122. };
  123.  
  124. //========================================================================================
  125. //    Inlines
  126. //========================================================================================
  127.  
  128. //---------------------------------------------------------------------------------------
  129. //    FW_CEmbeddingPart::PrivGetNextFrameGroup
  130. //----------------------------------------------------------------------------------------
  131. inline ODID FW_CEmbeddingPart::PrivGetNextFrameGroup(Environment*)
  132. {
  133.     return ++fNextFrameGroup;
  134. }
  135.  
  136. #endif
  137.  
  138.  
  139.  
  140.